/**
 * Created by wry on 2015/1/13.
 */

module.exports = function (app) {
    var activity = require('../controllers/activity-controller')

    app.post('/rest/' + RESTFullServiceVersion + '/activities/createActivity/:bgNo/:token/:deviceId', activity.createActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activities/getTopActivityList/:token/:deviceId', activity.getTopActivityList);
    app.get('/rest/' + RESTFullServiceVersion + '/activities/getActivityDetail/:activityId/:token/:deviceId', activity.getActivityDetail);
    app.post('/rest/' + RESTFullServiceVersion + '/activities/doRegister/:token/:deviceId', activity.doRegister);
    app.post('/rest/' + RESTFullServiceVersion + '/activities/addActivityInformation/:token/:deviceId', activity.addActivityInformation);

    app.get('/rest/' + RESTFullServiceVersion + '/activities/getActivityPhotoDetail/:activityId/:imageId/:token/:deviceId', activity.getActivityPhotoDetail)
    app.post('/rest/' + RESTFullServiceVersion + '/activities/postPhotoComment/:token/:deviceId', activity.postPhotoComment);

    app.get('/rest/' + RESTFullServiceVersion + '/activities/getMyActivity/:token/:deviceId', activity.getMyActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activities/getActivityRegistrationList/:activityId/:token/:deviceId', activity.getActivityRegistrationList);
    app.get('/rest/' + RESTFullServiceVersion + '/activities/getActivityGroupMember/:groupId/:token/:deviceId', activity.getActivityGroupMember);

    app.get('/rest/' + RESTFullServiceVersion + '/activities/searchActivityVenueByKeyword/:keyword/:token/:deviceId', activity.searchActivityVenueByKeyword);
    app.post('/rest/' + RESTFullServiceVersion + '/activities/postTextMessage/:token/:deviceId', activity.postTextMessage);
    app.get('/rest/' + RESTFullServiceVersion + '/activities/getActivityChats/:groupId/:token/:deviceId', activity.getActivityChats);


    //=================================================新版================================================
    app.post('/rest/' + RESTFullServiceVersion + '/activity/postNeighbourActivity/:token/:deviceId', activity.postNeighbourActivity);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/updateActivity/:activityId/:token/:deviceId', activity.updateActivity);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/joinInNeighbourActivity/:token/:deviceId', activity.joinInNeighbourActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/exitNeighbourActivity/:activityId/:token/:deviceId', activity.exitNeighbourActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getDetailOfActivity/:activityId/:token/:deviceId', activity.getDetailOfActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getDetailReplyOfActivity/:activityId/:page/:token/:deviceId', activity.getDetailReplyOfActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getActivityPartakeList/:activityId/:page/:token/:deviceId', activity.getActivityPartakeList);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/postActivityReply/:activityId/:token/:deviceId', activity.postActivityReply);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/closeActivity/:activityId/:token/:deviceId', activity.closeActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getActivityList/:ts/:token/:deviceId', activity.getActivityList);
    app.delete('/rest/' + RESTFullServiceVersion + '/activity/deleteActivity/:activityId/:token/:deviceId', activity.deleteActivity);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/setPartakeStatus/:token/:deviceId', activity.setPartakeStatus);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/reportActivity/:activityId/:token/:deviceId', activity.reportActivity);
    app.delete('/rest/' + RESTFullServiceVersion + '/activity/deleteActivityReply/:activityId/:replyId/:token/:deviceId', activity.deleteActivityReply);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/thankActivityReply/:activityId/:replyId/:replyBy/:token/:deviceId', activity.thankActivityReply);

    //1.5.0
    app.post('/rest/' + RESTFullServiceVersion + '/activity/joinInActivityNew/:token/:deviceId', activity.joinInActivityNew);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getActivityPartakeListNew/:activityId/:page/:token/:deviceId', activity.getActivityPartakeListNew);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/searchPartake/:token/:deviceId', activity.searchPartake);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/setPartakeManagerStatus/:token/:deviceId', activity.setPartakeManagerStatus);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getMyInvolvedActivity/:ts/:token/:deviceId', activity.getMyInvolvedActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/activity/getMyReleasedActivity/:ts/:token/:deviceId', activity.getMyReleasedActivity);
    app.post('/rest/' + RESTFullServiceVersion + '/activity/pushActivityMessage/:token/:deviceId', activity.pushActivityMessage);

};